<?php

/*
 * CopyRight  : (C)2012-2099 HaoTeam Inc.
 * Document   : AdminUserRoleValidate.php
 * Created on : 2021-2-17 11:00:23
 * Author     : Tiger <1192851302@qq.com>
 * Description: This is NOT a freeware, use is subject to license terms.
 *              这即使是一个免费软件,使用时也请遵守许可证条款,得到当时人书面许可.
 *              未经书面许可,不得翻版,翻版必究;版权归属 HaoTeam Inc;
 */

namespace haoteam\http\validates;

use think\Validate;

/**
 * 
 * Class AdminUserRoleValidate
 * Tiger <1192851302@qq.com> 2021-2-17 11:00:23
 */
class AdminUserRoleValidate extends Validate {

    protected $rule = [
        'id' => 'require|number',
        'title' => 'require|chs|max:6'
    ];
    protected $message = [
        'id.require' => 'ID不能为空',
        'id.number' => 'ID格式不正确',
        'title.require' => '名称不能为空',
        'title.chsDash' => '名称只能是汉字',
        'title.max' => '名称最大6个字符'
    ];
    protected $scene = [
        'create' => ['title'],
        'update' => ['id', 'title'],
        'delete' => ['id']
    ];

}
